package com.virus.coronavirus.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author: Bbeginner
 * @Date: 2021/2/4 14:31
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserVO {
    private Long id;

    @NotBlank(message = "用户姓名不能为空")
    private String username;


    private String nickname;

    @Email
    private String email;

//    @NotBlank(message = "用户电话不能为空")
    private String phone_number;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date create_time;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private  Date modified_time;

    private Integer sex;

    @NotBlank(message = "密码不能为空")
    private String password;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date birth;

    private String avatar;

    @NotNull(message = "用户状态不能为空")
    private Integer status;

    private Integer admin;

}
